<template>
  <div>
    <a-table
      ref="table"
      on-load
      :column="column"
      checkbox
      index
      url="/location/pageDetail"
      method="GET"
      :params="params"
      :format="formatData"
      :check-list.sync="check_list"
      @avc="123"
      @onload="onload"
    >
      <template v-slot:operation="slot">
        <el-button type="primary" @click="jumn(slot.data)">123</el-button>
      </template>
    </a-table>
  </div>
</template>

<script>
export default {

  name: 'Location',
  components: {
    'a-table': () => import('@/components/table')
  },
  data() {
    return {
      page: {
        areaName: '',
        name: '',
        current: 1,
        size: 10
      },
      params: {
        areaName: '',
        name: '',
        current: 1,
        size: 10
      },
      check_list: [],
      column: [
        {
          type: 'function',
          label: '文明6',
          prop: 'areaName',
          callback: () => {
            return 221321
          }
        },
        {
          label: '文明',
          prop: 'createName'
        },
        {
          label: '名字',
          prop: 'name'
        }
      ]
    }
  },

  created() {},
  methods: {
    onload(val) {
      console.log(val)
    },
    formatData(data) {
      return data
    },
    jumn(val) {
      console.log(val)
    }
  }
}
</script>
<style lang='scss' scoped>
</style>
